<?php defined( '_SYS' ) or die( 'No direct script access allowed' );?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title><?php echo $this->title; ?></title>
<?php echo $this->headData; ?>
</head>
<body>

	<div id="toolbar-box">
		<div class="t">
			<div class="t">
				<div class="t"></div>
			</div>
		</div>
		<div class="m">
			<div class="toolbar" id="toolbar">
				<table class="toolbar">
					<tr>
						<td class="button" id="toolbar-save">
							<a href="#" onclick="javascript: submitbutton('save')" class="toolbar">
								<span class="icon-32-save" title="Save">
								</span>
							<?php echo C_text::_('Save');?>
							</a>
						</td>
						<td class="button" id="toolbar-cancel">
							<a href="#" onclick="javascript: submitbutton('cancel')" class="toolbar">
								<span class="icon-32-cancel" title="Cancel">
								</span>
							<?php echo C_text::_('Cancel');?>
							</a>
						</td>
					</tr>
				</table>
			</div>
			<div class="header icon-48-config"><?php echo C_text::_('ToolBox');?></div>	
			<div class="clr"></div>		
		</div>
		<div class="b">
			<div class="b">
				<div class="b"></div>
			</div>
		</div>
	</div>
	
	<div id="submenu-box">
			<div class="t">
				<div class="t">
					<div class="t"></div>
		 		</div>
	 		</div>
			<div class="m">
				<div class="submenu-box">
					<div class="submenu-pad">
						<ul id="submenu" class="configuration">
							<li><a id="site"><?php echo C_text::_('Site');?></a></li>
							<li><a id="system"><?php echo C_text::_('System');?></a></li>
							<li><a id="server"><?php echo C_text::_('Server');?></a></li>
						</ul>

					<div class="clr"></div>
					</div>
				</div>
				<div class="clr"></div>
			</div>
			<div class="b">
				<div class="b"><div class="b"></div></div>
			</div>
		</div>
	<div class="clr"></div>
<?php 	if($this->message) echo $this->message;?>
	<div id="element-box">
		<div class="t">
			<div class="t">
				<div class="t"></div>
			</div>
		</div>	
		<div class="m">
			<form action="<?php echo WEBSELF; ?>/config" method="post" name="adminForm">
				<div id="config-document">
					<div id="page-site" class="nodisplay">
						<table class="noshow">
							<tr>
								<td width="65%">
									<fieldset class="adminform">
										<legend><?php echo C_text::_( 's_Item1' ); ?></legend>
										<div class="pane-sliders">
											<?php
											$langs = $SYS->lang->getALL(1,'backend');
											for($i=0;$i<count($langs);$i++)			
											{
												$tmplang=$langs[$i];
												if(isset($this->itemfield[$i]['id']))
												{					
													$value = $this->itemfield[$i]['fieldvalue'];
													$idinput = '<input type="hidden" name="sitenameid['.$tmplang->id.']" value="'.$this->itemfield[$i]['id'].'" />';
												}else
												{
													$value = '';
													$idinput = '';
												}
											?>
											<div class="panel">
												<h4 id="cpanel-panel-logged" class="title pane-toggler"><a href="#"><span><?php echo $tmplang->title;?></span></a></h4>
												<div class="pane-slider content">
													<table class="admintable" cellpadding="1">														
														<tr class="row0">
															<td class="key">
																<label class="editlinktip hasTip" title="<?php echo C_text::_( 's_Item8' ); ?>::<?php echo C_text::sprintf( 's_Tip8',$tmplang->title ); ?>">
																<?php echo C_text::_( 's_Item8' ); ?>
																</label>
															</td>
															<td>
																<input type="text" name="sitename[<?php echo $tmplang->id; ?>]" id="sitename[<?php echo $tmplang->id; ?>]" class="inputbox" size="40" value="<?php echo $value; ?>" />
																<?php echo $idinput;?>
															</td>
														</tr>
													</table>
												</div>
											</div>
											<?php
											}
											?>
										</div>
										<table class="admintable" cellspacing="1">
											<tbody>
												<tr class="row0">
													<td width="150" class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 's_Item2' ); ?>::<?php echo C_text::_( 's_Tip2' ); ?>">
														<?php echo C_text::_( 's_Item2' ); ?>
														</label>
													</td>
													<td>			
														<?php echo $this->lists['offline']; ?>
													</td>
												</tr>
												<tr class="row0">
													<td valign="top" class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 's_Item3' ); ?>::<?php echo C_text::_( 's_Tip3' ); ?>">
														<?php echo C_text::_( 's_Item3' ); ?>
														</label>
													</td>
													<td>
														<textarea class="text_area" cols="60" rows="2" style="width:600px; height:40px" name="config[offline_message]"><?php echo $this->row->item('offline_message'); ?></textarea>
													</td>
												</tr>
												<tr class="row0">
													<td width="150" class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 's_Item4' ); ?>::<?php echo C_text::_( 's_Tip4' ); ?><br /><img name=sitetheme src=<?php echo SITEURL.'/templates/sites/default/preview.png';?> />">
														<?php echo C_text::_( 's_Item4' ); ?>
														</label>
													</td>
													<td>			
														<?php echo $this->themes; ?>
													</td>
												</tr>
												<tr class="row0">
													<td class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 's_Item10' ); ?>::<?php echo C_text::_( 's_Tip10' ); ?>">
													<?php echo C_text::_( 's_Item10' ); ?>
													</label>
													</td>
													<td>
														<input class="text_area" type="text" name="config[anti_refresh_time]" size="50" value="<?php echo $this->row->item('anti_refresh_time'); ?>" />
														<?php echo C_text::_( 's_Item11' ); ?>
													</td>
												</tr>
												<tr class="row0">
													<td class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 's_Item12' ); ?>::<?php echo C_text::_( 's_Tip12' ); ?>">
													<?php echo C_text::_( 's_Item12' ); ?>
													</label>
													</td>
													<td>
														<input class="text_area" type="text" name="config[filtering]" size="50" value="<?php echo $this->row->item('filtering'); ?>" />
														<?php echo C_text::_( 's_Item13' ); ?>
													</td>
												</tr>
												<tr class="row0">
													<td class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 's_Item14' ); ?>::<?php echo C_text::_( 's_Tip14' ); ?>">
													<?php echo C_text::_( 's_Item14' ); ?>
													</label>
													</td>
													<td>
														<input class="text_area" type="text" name="config[file_format]" size="50" value="<?php echo $this->row->item('file_format'); ?>" />
														<?php echo C_text::_( 's_Item13' ); ?>
													</td>
												</tr>
												<tr class="row0">
													<td class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 's_Item15' ); ?>::<?php echo C_text::_( 's_Tip15' ); ?>">
													<?php echo C_text::_( 's_Item15' ); ?>
													</label>
													</td>
													<td>
														<input class="text_area" type="text" name="config[file_maxsize]" size="50" value="<?php echo $this->row->item('file_maxsize'); ?>" />Mb 
													</td>
												</tr>
											</tbody>	
										</table>
									</fieldset>
									<fieldset class="adminform">
										<legend><?php echo C_text::_( 's_Item16' ); ?></legend>
										<table class="admintable" cellspacing="1">
											<tbody>
												<tr class="row0">
													<td valign="top" class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 's_Item17' ); ?>::<?php echo C_text::_( 's_Tip17' ); ?>">
														<?php echo C_text::_( 's_Item17' ); ?>
														</label>
													</td>
													<td>
														<textarea class="text_area" cols="60" rows="20" style="width:600px; height:60px" name="config[metadesc]"><?php echo $this->row->item('metadesc'); ?></textarea>
													</td>
												</tr>
												<tr class="row0">
													<td valign="top" class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 's_Item18' ); ?>::<?php echo C_text::_( 's_Tip18' ); ?>">
														<?php echo C_text::_( 's_Item18' ); ?>
														</label>
													</td>
													<td>
														<textarea class="text_area" cols="60" rows="20" style="width:600px; height:60px" name="config[metakeys]"><?php echo $this->row->item('metakeys'); ?></textarea>
													</td>
												</tr>
												<tr class="row0">
													<td class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 's_Item19' ); ?>::<?php echo C_text::_( 's_Tip19' ); ?>">
													<?php echo C_text::_( 's_Item19' ); ?>
													</label>
													</td>
													<td>
														<input class="text_area" type="text" name="config[metaauthor]" size="50" value="<?php echo $this->row->item('metaauthor'); ?>" />
													</td>
												</tr>
											</tbody>	
										</table>
									</fieldset>
								</td>
							</tr>
					</table>
				</div>
				<div id="page-system" class="nodisplay">
						<table class="noshow">
							<tr>
								<td width="65%">
									<fieldset class="adminform">
										<legend><?php echo C_text::_( 'y_Item1' ); ?></legend>
										<table class="admintable" cellspacing="1">
											<tbody>
												<tr class="row0">
													<td class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 'y_Item2' ); ?>::<?php echo C_text::_( 'y_Tip2' ); ?>">
														<?php echo C_text::_( 'y_Item2' ); ?>
														</label>
													</td>
													<td>			
														<input class="text_area" type="text" name="config[secretword]" size="50" value="<?php echo $this->row->item('secretword'); ?>" />
													</td>
												</tr>
												<tr class="row0">
													<td class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 'y_Item4' ); ?>::<?php echo C_text::_( 'y_Tip4' ); ?>">
														<?php echo C_text::_( 'y_Item4' ); ?>
														</label>
													</td>
													<td>			
														<?php echo $this->lists['activation']; ?>
													</td>
												</tr>
												<tr class="row0">
													<td class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 'y_Item10' ); ?>::<?php echo C_text::_( 'y_Tip10' ); ?>">
														<?php echo C_text::_( 'y_Item10' ); ?>
														</label>
													</td>
													<td>			
														<?php echo C_HTML::_( 'access.usergroup','config[register_group]',$this->row->item('register_group'),'class="inputbox" size="1"',null,'WHERE a.section="front"');?>
													</td>
												</tr>
											</tbody>
										</table>
									</fieldset>
									<fieldset class="adminform">
										<legend><?php echo C_text::_( 'y_Item5' ); ?></legend>
										<table class="admintable" cellspacing="1">
											<tbody>
												<tr class="row0">
													<td class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 'y_Item6' ); ?>::<?php echo C_text::_( 'y_Tip6' ); ?>">
														<?php echo C_text::_( 'y_Item6' ); ?>
														</label>
													</td>
													<td>			
														<?php echo $this->lists['caching']; ?>
													</td>
												</tr>
												<tr class="row0">
													<td class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 'y_Item7' ); ?>::<?php echo C_text::_( 'y_Tip7' ); ?>">
														<?php echo C_text::_( 'y_Item7' ); ?>
														</label>
													</td>
													<td>			
														<input class="text_area" type="text" name="config[cachetime]" size="50" value="<?php echo $this->row->item('cachetime'); ?>" /><?php echo C_text::_('s_Item11');?>
													</td>
												</tr>
											</tbody>
										</table>
									</fieldset>
									<fieldset class="adminform">
										<legend><?php echo C_text::_( 'y_Item8' ); ?></legend>
										<table class="admintable" cellspacing="1">
											<tbody>
												<tr class="row0">
													<td class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 'y_Item9' ); ?>::<?php echo C_text::_( 'y_Tip9' ); ?>">
														<?php echo C_text::_( 'y_Item9' ); ?>
														</label>
													</td>
													<td>			
														<input class="text_area" type="text" name="config[lifetime]" size="50" value="<?php echo $this->row->item('lifetime'); ?>" /><?php echo C_text::_('s_Item11');?>
													</td>
												</tr>
											</tbody>
										</table>
									</fieldset>
								</td>
							</tr>
							
					</table>
				</div>
				<div id="page-server" class="nodisplay">
						<table class="noshow">
							<tr>
								<td width="65%">
									<fieldset class="adminform">
										<legend><?php echo C_text::_( 'e_Item1' ); ?></legend>
										<table class="admintable" cellspacing="1">
											<tbody>
												<tr class="row0">
													<td class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 'e_Item3' ); ?>::<?php echo C_text::_( 'e_Tip3' ); ?>">
														<?php echo C_text::_( 'e_Item3' ); ?>
														</label>
													</td>
													<td>			
														<input class="text_area" type="text" name="config[fromname]" size="50" value="<?php echo $this->row->item('fromname'); ?>" />
													</td>
												</tr>
												<tr class="row0">
													<td class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 'e_Item4' ); ?>::<?php echo C_text::_( 'e_Tip4' ); ?>">
														<?php echo C_text::_( 'e_Item4' ); ?>
														</label>
													</td>
													<td>			
														<input class="text_area" type="text" name="config[smtpuser]" size="50" value="<?php echo $this->row->item('smtpuser'); ?>" />
													</td>
												</tr>
												<tr class="row0">
													<td class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 'e_Item5' ); ?>::<?php echo C_text::_( 'e_Tip5' ); ?>">
														<?php echo C_text::_( 'e_Item5' ); ?>
														</label>
													</td>
													<td>			
														<input class="text_area" type="password" name="config[smtppass]" size="50" value="<?php echo $this->row->item('smtppass'); ?>" />
													</td>
												</tr>
												<tr class="row0">
													<td class="key">
														<label class="editlinktip hasTip" title="<?php echo C_text::_( 'e_Item6' ); ?>::<?php echo C_text::_( 'e_Tip6' ); ?>">
														<?php echo C_text::_( 'e_Item6' ); ?>
														</label>
													</td>
													<td>			
														<input class="text_area" type="text" name="config[smtphost]" size="50" value="<?php echo $this->row->item('smtphost'); ?>" />
													</td>
												</tr>
											</tbody>
										</table>
									</fieldset>
								</td>
							</tr>
					</table>
				</div>
				
				<div class="clr"></div>
				<input type="hidden" name="task" value="" />
				<?php echo C_HTML::_( 'form.token' ); ?>
			</form>
		</div>		
	</div>
	<div class="b">
		<div class="b">
			<div class="b"></div>
		</div>
	</div>
	<div id="forTips"></div>
	<center>
	Powered by <b><a href='http://www.metinfo.cn' target='_blank'>MetInfo</a></b> ©2008- <?php echo date('Y',time());?>&nbsp;<a href='http://www.metinfo.cn' target='_blank'>www.MetInfo.cn</a>
	</center>
	<?php echo $this->js; ?>
</body>
</html>